package mblog.web.controller.desk.search;

import mblog.base.jsoup.BaiXingUtils;
import mblog.core.data.Addresses;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.*;

@Controller
@RequestMapping("jsoup")
public class JsoupController {

    @Autowired
    private StringRedisTemplate stringRedisTemplate;

    private static String url = "http://shanghai.baixing.com/ershou/";  //百姓网上海站点

    @RequestMapping("index")
    @ResponseBody
    @Async
    public List<Map<String,String>> ajaxAdd(Integer otype, String parentId) {
        List<Map<String,String>> mapList = BaiXingUtils.bxUtils(url);
        return mapList;
    }

}
